package com.wz.service;

import com.wz.dao.LoginMapper;
import com.wz.pojo.UserInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;



@Service
@Transactional//控制事务
public class LoginServiceImpl implements LoginService {

    @Autowired
    private LoginMapper loginMapper;

    /**注册*/
    @Override
    public void register( UserInfo userInfo) {
         loginMapper.saveUser(userInfo);
    }

    /**登录*/
    @Override
    public UserInfo login(String loginName,String loginPwd) {
        return loginMapper.login(loginName,loginPwd);
    }


}
